package view;

import java.util.Observable;
import java.util.Observer;

import javax.swing.JTextArea;
import javax.swing.JTextField;

import model.Methods;
import model.function;

public class Display extends JTextArea implements Observer {

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	private Methods operator;
	
	public Display(Methods operator) {
		new JTextField();
		this.operator = operator;
	}
	
	public Display(String value) {
		new JTextField(value);
	}

	public void update(Observable arg0, Object arg1) {
		this.setText("" + operator.getResult());
	}

}
